#pragma once

#include "Patient.h"
#include "korlapadmin_model_global.h"

class KORLAPADMIN_MODEL_EXPORT Filter
{
public:
	Filter(void);
	~Filter(void);

	unsigned int getId();
	void setId(unsigned int id);

	QString getName()const;
	void setName(const QString& name);
	
	const Patient* getPatient()const;
	void setPatient(const Patient* p);

	bool isDefault();
	void setDefault(bool def);

	QDate getFrom()const;
	void setFrom(QDate from);

	QDate getTo()const;
	void setTo(QDate to);

	bool isFirstVisits()const;
	void setFirstVisits(bool b);

	bool isLastVisits()const;
	void setLastVisits(bool b);
	
	bool isOnlyFollowUps()const;
	void setOnlyFollowUps(bool b);

	bool operator<=(const Filter& filter)const;

private:
	unsigned int id;
	QString name;
	const Patient* patient;
	bool is_default;
	QDate from;
	QDate to;
	bool onlyFirstVisits;
	bool onlyLastVisits;
	bool onlyFollowUps;
};
